﻿using System.Net;

namespace Athena.RouteAddress
{
    public class IPAddressRoute : Route
    {

        public IPAddressRoute()
        {

        }

        public IPAddressRoute(string ip, int port)
        {
            IP = ip;
            Port = port;
        }

        public string IP { get; set; }

        public int Port { get; set; }

        public override EndPoint CreateEndPoint()
        {
            return new IPEndPoint(IPAddress.Parse(IP), Port);
        }

        public override string ToString()
        {
            return $"{IP}:{Port}";
        }
    }
}
